package com;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TPubuserId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TPubuserId implements java.io.Serializable {

	// Fields

	private String guid;
	private Integer itemid;
	private String code;
	private String name;
	private String shortname;
	private String wholename;
	private Date startdate;
	private Date enddate;
	private Short levelno;
	private Byte isleaf;
	private Integer status;
	private Integer superitemid;
	private Long versionnum;
	private Boolean action;
	private String elementcode;
	private String password;
	private String idcardno;
	private String organid;
	private String position;
	private BigDecimal celaner;
	private String orgtype;
	private String tel;
	private BigDecimal isadmin;

	// Constructors

	/** default constructor */
	public TPubuserId() {
	}

	/** minimal constructor */
	public TPubuserId(Integer itemid, String code, String name, Short levelno,
			Byte isleaf, Integer status, String organid) {
		this.itemid = itemid;
		this.code = code;
		this.name = name;
		this.levelno = levelno;
		this.isleaf = isleaf;
		this.status = status;
		this.organid = organid;
	}

	/** full constructor */
	public TPubuserId(String guid, Integer itemid, String code, String name,
			String shortname, String wholename, Date startdate, Date enddate,
			Short levelno, Byte isleaf, Integer status, Integer superitemid,
			Long versionnum, Boolean action, String elementcode,
			String password, String idcardno, String organid, String position,
			BigDecimal celaner, String orgtype, String tel, BigDecimal isadmin) {
		this.guid = guid;
		this.itemid = itemid;
		this.code = code;
		this.name = name;
		this.shortname = shortname;
		this.wholename = wholename;
		this.startdate = startdate;
		this.enddate = enddate;
		this.levelno = levelno;
		this.isleaf = isleaf;
		this.status = status;
		this.superitemid = superitemid;
		this.versionnum = versionnum;
		this.action = action;
		this.elementcode = elementcode;
		this.password = password;
		this.idcardno = idcardno;
		this.organid = organid;
		this.position = position;
		this.celaner = celaner;
		this.orgtype = orgtype;
		this.tel = tel;
		this.isadmin = isadmin;
	}

	// Property accessors

	@Column(name = "GUID", length = 38)
	public String getGuid() {
		return this.guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	@Column(name = "ITEMID", nullable = false, precision = 9, scale = 0)
	public Integer getItemid() {
		return this.itemid;
	}

	public void setItemid(Integer itemid) {
		this.itemid = itemid;
	}

	@Column(name = "CODE", nullable = false, length = 50)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "NAME", nullable = false, length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "SHORTNAME", length = 100)
	public String getShortname() {
		return this.shortname;
	}

	public void setShortname(String shortname) {
		this.shortname = shortname;
	}

	@Column(name = "WHOLENAME", length = 100)
	public String getWholename() {
		return this.wholename;
	}

	public void setWholename(String wholename) {
		this.wholename = wholename;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "STARTDATE", length = 7)
	public Date getStartdate() {
		return this.startdate;
	}

	public void setStartdate(Date startdate) {
		this.startdate = startdate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "ENDDATE", length = 7)
	public Date getEnddate() {
		return this.enddate;
	}

	public void setEnddate(Date enddate) {
		this.enddate = enddate;
	}

	@Column(name = "LEVELNO", nullable = false, precision = 3, scale = 0)
	public Short getLevelno() {
		return this.levelno;
	}

	public void setLevelno(Short levelno) {
		this.levelno = levelno;
	}

	@Column(name = "ISLEAF", nullable = false, precision = 2, scale = 0)
	public Byte getIsleaf() {
		return this.isleaf;
	}

	public void setIsleaf(Byte isleaf) {
		this.isleaf = isleaf;
	}

	@Column(name = "STATUS", nullable = false, precision = 9, scale = 0)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "SUPERITEMID", precision = 9, scale = 0)
	public Integer getSuperitemid() {
		return this.superitemid;
	}

	public void setSuperitemid(Integer superitemid) {
		this.superitemid = superitemid;
	}

	@Column(name = "VERSIONNUM", precision = 15, scale = 0)
	public Long getVersionnum() {
		return this.versionnum;
	}

	public void setVersionnum(Long versionnum) {
		this.versionnum = versionnum;
	}

	@Column(name = "ACTION", precision = 1, scale = 0)
	public Boolean getAction() {
		return this.action;
	}

	public void setAction(Boolean action) {
		this.action = action;
	}

	@Column(name = "ELEMENTCODE", length = 30)
	public String getElementcode() {
		return this.elementcode;
	}

	public void setElementcode(String elementcode) {
		this.elementcode = elementcode;
	}

	@Column(name = "PASSWORD", length = 60)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "IDCARDNO", length = 18)
	public String getIdcardno() {
		return this.idcardno;
	}

	public void setIdcardno(String idcardno) {
		this.idcardno = idcardno;
	}

	@Column(name = "ORGANID", nullable = false, length = 6)
	public String getOrganid() {
		return this.organid;
	}

	public void setOrganid(String organid) {
		this.organid = organid;
	}

	@Column(name = "POSITION")
	public String getPosition() {
		return this.position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	@Column(name = "CELANER", precision = 22, scale = 0)
	public BigDecimal getCelaner() {
		return this.celaner;
	}

	public void setCelaner(BigDecimal celaner) {
		this.celaner = celaner;
	}

	@Column(name = "ORGTYPE", length = 6)
	public String getOrgtype() {
		return this.orgtype;
	}

	public void setOrgtype(String orgtype) {
		this.orgtype = orgtype;
	}

	@Column(name = "TEL", length = 30)
	public String getTel() {
		return this.tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	@Column(name = "ISADMIN", precision = 22, scale = 0)
	public BigDecimal getIsadmin() {
		return this.isadmin;
	}

	public void setIsadmin(BigDecimal isadmin) {
		this.isadmin = isadmin;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TPubuserId))
			return false;
		TPubuserId castOther = (TPubuserId) other;

		return ((this.getGuid() == castOther.getGuid()) || (this.getGuid() != null
				&& castOther.getGuid() != null && this.getGuid().equals(
				castOther.getGuid())))
				&& ((this.getItemid() == castOther.getItemid()) || (this
						.getItemid() != null
						&& castOther.getItemid() != null && this.getItemid()
						.equals(castOther.getItemid())))
				&& ((this.getCode() == castOther.getCode()) || (this.getCode() != null
						&& castOther.getCode() != null && this.getCode()
						.equals(castOther.getCode())))
				&& ((this.getName() == castOther.getName()) || (this.getName() != null
						&& castOther.getName() != null && this.getName()
						.equals(castOther.getName())))
				&& ((this.getShortname() == castOther.getShortname()) || (this
						.getShortname() != null
						&& castOther.getShortname() != null && this
						.getShortname().equals(castOther.getShortname())))
				&& ((this.getWholename() == castOther.getWholename()) || (this
						.getWholename() != null
						&& castOther.getWholename() != null && this
						.getWholename().equals(castOther.getWholename())))
				&& ((this.getStartdate() == castOther.getStartdate()) || (this
						.getStartdate() != null
						&& castOther.getStartdate() != null && this
						.getStartdate().equals(castOther.getStartdate())))
				&& ((this.getEnddate() == castOther.getEnddate()) || (this
						.getEnddate() != null
						&& castOther.getEnddate() != null && this.getEnddate()
						.equals(castOther.getEnddate())))
				&& ((this.getLevelno() == castOther.getLevelno()) || (this
						.getLevelno() != null
						&& castOther.getLevelno() != null && this.getLevelno()
						.equals(castOther.getLevelno())))
				&& ((this.getIsleaf() == castOther.getIsleaf()) || (this
						.getIsleaf() != null
						&& castOther.getIsleaf() != null && this.getIsleaf()
						.equals(castOther.getIsleaf())))
				&& ((this.getStatus() == castOther.getStatus()) || (this
						.getStatus() != null
						&& castOther.getStatus() != null && this.getStatus()
						.equals(castOther.getStatus())))
				&& ((this.getSuperitemid() == castOther.getSuperitemid()) || (this
						.getSuperitemid() != null
						&& castOther.getSuperitemid() != null && this
						.getSuperitemid().equals(castOther.getSuperitemid())))
				&& ((this.getVersionnum() == castOther.getVersionnum()) || (this
						.getVersionnum() != null
						&& castOther.getVersionnum() != null && this
						.getVersionnum().equals(castOther.getVersionnum())))
				&& ((this.getAction() == castOther.getAction()) || (this
						.getAction() != null
						&& castOther.getAction() != null && this.getAction()
						.equals(castOther.getAction())))
				&& ((this.getElementcode() == castOther.getElementcode()) || (this
						.getElementcode() != null
						&& castOther.getElementcode() != null && this
						.getElementcode().equals(castOther.getElementcode())))
				&& ((this.getPassword() == castOther.getPassword()) || (this
						.getPassword() != null
						&& castOther.getPassword() != null && this
						.getPassword().equals(castOther.getPassword())))
				&& ((this.getIdcardno() == castOther.getIdcardno()) || (this
						.getIdcardno() != null
						&& castOther.getIdcardno() != null && this
						.getIdcardno().equals(castOther.getIdcardno())))
				&& ((this.getOrganid() == castOther.getOrganid()) || (this
						.getOrganid() != null
						&& castOther.getOrganid() != null && this.getOrganid()
						.equals(castOther.getOrganid())))
				&& ((this.getPosition() == castOther.getPosition()) || (this
						.getPosition() != null
						&& castOther.getPosition() != null && this
						.getPosition().equals(castOther.getPosition())))
				&& ((this.getCelaner() == castOther.getCelaner()) || (this
						.getCelaner() != null
						&& castOther.getCelaner() != null && this.getCelaner()
						.equals(castOther.getCelaner())))
				&& ((this.getOrgtype() == castOther.getOrgtype()) || (this
						.getOrgtype() != null
						&& castOther.getOrgtype() != null && this.getOrgtype()
						.equals(castOther.getOrgtype())))
				&& ((this.getTel() == castOther.getTel()) || (this.getTel() != null
						&& castOther.getTel() != null && this.getTel().equals(
						castOther.getTel())))
				&& ((this.getIsadmin() == castOther.getIsadmin()) || (this
						.getIsadmin() != null
						&& castOther.getIsadmin() != null && this.getIsadmin()
						.equals(castOther.getIsadmin())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getGuid() == null ? 0 : this.getGuid().hashCode());
		result = 37 * result
				+ (getItemid() == null ? 0 : this.getItemid().hashCode());
		result = 37 * result
				+ (getCode() == null ? 0 : this.getCode().hashCode());
		result = 37 * result
				+ (getName() == null ? 0 : this.getName().hashCode());
		result = 37 * result
				+ (getShortname() == null ? 0 : this.getShortname().hashCode());
		result = 37 * result
				+ (getWholename() == null ? 0 : this.getWholename().hashCode());
		result = 37 * result
				+ (getStartdate() == null ? 0 : this.getStartdate().hashCode());
		result = 37 * result
				+ (getEnddate() == null ? 0 : this.getEnddate().hashCode());
		result = 37 * result
				+ (getLevelno() == null ? 0 : this.getLevelno().hashCode());
		result = 37 * result
				+ (getIsleaf() == null ? 0 : this.getIsleaf().hashCode());
		result = 37 * result
				+ (getStatus() == null ? 0 : this.getStatus().hashCode());
		result = 37
				* result
				+ (getSuperitemid() == null ? 0 : this.getSuperitemid()
						.hashCode());
		result = 37
				* result
				+ (getVersionnum() == null ? 0 : this.getVersionnum()
						.hashCode());
		result = 37 * result
				+ (getAction() == null ? 0 : this.getAction().hashCode());
		result = 37
				* result
				+ (getElementcode() == null ? 0 : this.getElementcode()
						.hashCode());
		result = 37 * result
				+ (getPassword() == null ? 0 : this.getPassword().hashCode());
		result = 37 * result
				+ (getIdcardno() == null ? 0 : this.getIdcardno().hashCode());
		result = 37 * result
				+ (getOrganid() == null ? 0 : this.getOrganid().hashCode());
		result = 37 * result
				+ (getPosition() == null ? 0 : this.getPosition().hashCode());
		result = 37 * result
				+ (getCelaner() == null ? 0 : this.getCelaner().hashCode());
		result = 37 * result
				+ (getOrgtype() == null ? 0 : this.getOrgtype().hashCode());
		result = 37 * result
				+ (getTel() == null ? 0 : this.getTel().hashCode());
		result = 37 * result
				+ (getIsadmin() == null ? 0 : this.getIsadmin().hashCode());
		return result;
	}

}